package com.yhq.spring.spring.conf;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @author hqyin
 * @date 2023/4/12 3:02 下午
 */
//@Component
public class MyBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("==========>1初始化之前，beanName:+"+beanName+",bean:"+bean);
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("==========>1初始化之后，beanName:+"+beanName+",bean:"+bean);
        return bean;
    }
}
